Developer Documentation

QuickTime 4 API Documentation

QuickTime Movie File Format Specification, May 1996

| Previous | Chapter contents | Chapter top | Next |

User Data Atoms

User data atoms allow you to define and store arbitrary data associated with a QuickTime object, such as a movie, track, or media. The user data atom has an atom type of 'udta' .

Inside the user data atom is a list of atoms describing each piece of user data. User data provides a simple way to extend what is stored in a QuickTime movie. For example, you may use user data atoms to store a movie's window position, playback characteristics, or creation information.

Figure 0-43 shows the layout of a user data atom.

Figure 43 The layout of a user data atom

The user data atom contains the following data elements.

Size
A 32-bit integer that specifies the number of bytes in this user data atom.
Type
A 32-bit integer that identifies the atom type; this field must be set to 'udta' .
User data list
A user data list that is itself formatted like a series of atoms. Each data element in the private data portion of the user-defined data atom contains size and type information along with the data. Furthermore, for historical reasons the list of atoms is optionally terminated by a 32-bit integer set to 0. If you are writing a program to read user data atoms, you should allow for the terminating 0. However, if you are writing a program to create user data atoms, you can safely leave out the trailing 0.
Table 0-5 lists the currently defined list entry types.

Table 5 User data list entry types

List entry type

Description

'© cpy'

Copyright statement.

'© day'

Date the movie content was created.

'© dir'

Name of movie's director.

'© ed1' to '© ed9'

Edit dates and descriptions.

'© fmt'

Indication of movie format (computer-generated, digitized, and so on).

'© inf'

Information about the movie.

'© prd'

Name of movie's producer.

'© prf'

Names of performers.

'© req'

Special hardware and software requirements.

'© src'

Credits for those who provided movie source content.

'© wrt'

Name of movie's writer

'WLOC'

Default window location for movie. Two 16 bit values, {x,y}.

'name'

Name of object.

'LOOP'

Long integer indicating looping style. 0 for none, 1 for looping, 2 for palindrome looping.

'SelO'

Play selection only. Byte indicating that only the selected area of the movie be played.

'AllF'

Play all frames. Byte indicating that all frames of video should be played, regardless of timing.

All user data list entries whose type begins with the ' © ' character (ASCII 169), are defined to be international text. These list entries must contain a list of text strings with associated language codes. By storing multiple versions of the same text, a single user data text item can contain translations for different languages.

The list of text strings uses a small integer atom format, which is identical to the QuickTime atom format, except that it uses 16-bit values for size and type instead of 32-bit values. The first value is the size of the string, including the size and type, and the second value is the language code for the string.


© 1997 Apple Computer, Inc.

| Previous | Chapter contents | Chapter top | Next |